## -*- coding: utf-8 -*-
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>我看图</title>
        <link href="/assets/default.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/assets/jquery-1.9.1.min.js"></script>
        <style type="text/css">
        	body { background: #e5e5e5; }
            #title { padding: 30px 20px 10px; font: bold 100px "楷体", serif; color: #ccc; background: #fff; }
            ul { margin: 10px;}
            li { float: left; margin-right: 20px; position: relative; background: #fff; padding: 4px; border: 1px outset #eee; }
                li a p { position: absolute; left: 15px; top: 15px; background: rgba(255,255,255,0.7); color: #000; font-size: 14px; padding: 0 5px 4px; }
                li a span { position: absolute; left: 15px; bottom: 15px; background: rgba(0,0,0,0.7); color: #fff; padding: 2px 4px; }
            #browser_warning { position: absolute; display: none; left: 0; bottom: 0; padding: 5px 0; width: 100%; background: #f00; color: #fff; font-size: 14px;}
        </style>
        <script type="text/javascript">
        /*
            $(document).ready(function() {
                if(!($.browser.msie && $.browser.version == '8.0') && !($.browser.mozilla && parseFloat($.browser.version) >= 1.9)){
                    var vendor = $.browser.msie ? 'IE ' : 
                                 $.browser.mozilla ? 'Mozilla内核 ' : 
                                 $.browser.safari ? 'Safari ': 
                                 $.browser.opera ? 'Opera ' : 'Unknown';
                    $('#browser_info').text(vendor + $.browser.version);
                    $('#browser_warning').show();
                }
            });
        */
        </script>
    </head>
    <body>
        <p id="title">我看行{相册}</p>
    %if aas.count() == 0:
        还没有相册噢~
    %else:
        <ul>
        %for album in aas:
            <li>
                <a href="/album/${album.name}">
                    <p>${album.name}</p><span>${album.photo_set.count()} 张</span>
                    <img alt="相册“${album.name}”的封面" src="${album.genURL()}"/>
                </a>
            </li>
        %endfor
        </ul>
    %endif
    <div id="browser_warning">&nbsp;&nbsp;&nbsp;&nbsp;本网站只在MSIE8.0及Firefox3.6下进行过测试，您的浏览器（<span id="browser_info"></span>）浏览时显示效果可能不正常。</div>
    </body>
</html>